/* -----------------------------------------------------------------------------
 * PROJECT    : lwf
 * FILE       : TabDisplayInfo.java
 *
 * HISTORY:
 * Date          Author                        Description
 * ----------------------------------------------------------------------------- 
 * Apr 20, 2011  mycodetalks			       Created
 */
package net.lwf.entity;

import java.io.Serializable;
import java.util.List;

import net.lwf.jaxb.stubs.tabmenu.SubjectInfo;
import net.lwf.jaxb.stubs.tabmenu.TopicInfo;

/**
 * Class description goes here
 */
public class TabDisplayInfo extends SubjectInfo implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private String tdWidth = "10%";
	private boolean emptyTab = false;
	private List<TopicInfo> topicInfo;
	

	public String getTdWidth() {
		return tdWidth;
	}
	public void setTdWidth(String tdWidth) {
		this.tdWidth = tdWidth;
	}
	public boolean isEmptyTab() {
		return emptyTab;
	}
	public void setEmptyTab(boolean emptyTab) {
		this.emptyTab = emptyTab;
	}
	public List<TopicInfo> getTopicInfo() {
		return topicInfo;
	}
	public void setTopicInfo(List<TopicInfo> topicInfo) {
		this.topicInfo = topicInfo;
	}
	
    //-----------------------------------------------------------------------------------
    // Custom methods
    //-----------------------------------------------------------------------------------
	public String getAnchorid() {
		return getName().toLowerCase() + "anchor";
	}
	public String getMenuid() {
		return getName().toLowerCase() + "_menuid";
	}
	
	public String getTdId() {
		//return getName().toLowerCase() + "_style";
		return getName().toLowerCase();
	}
    
    public void print() {
    	System.out.println("-----> Subject Name: " + getName());
    	for(TopicInfo topic: getTopicInfo()) {
    		topic.print();
    	}
    }
	

}



